/*
 * Created on Feb 12, 2006 2:31:42 PM
 * 
 * $Id$
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package tripleo.curr;

class TOT {
	static class Proc1 implements Process {
		public void rcv(Process sender, long aMessage, Object aValue) {
			int y=2;
			System.out.println("** 1 5 senconds");
		}

		Object lk=new Object();
		public Object rcvLock() { return lk; }
	}
	static class Proc2 implements Process {
		Object lk=new Object();

		public void rcv(Process sender, long aMessage, Object aValue) {
			int y=2;
			System.out.println("** 2 2.5 senconds");
		}

		public Object rcvLock() { return lk; }

	}
	public static void main(String[] args) {
		Process p1=new Proc1();
		Process p2=new Proc2();
		Timeout.instance.add(5000,p1,null);
		Timeout.instance.add(2500,p2,null);
		Timeout.instance.start();
	}
}
